﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rance
{
    public class UI装备
    {
        public UI装备(string name, string description)
        {
            this.Name = name;
            this.Description = description;
        }

        public string Name { get; set; }
        public string Description { get; set; }

        public string ShowName
        {
            get
            {
                if (Description == "")
                    return "";
                else
                    return string.Format("{0}({1})", Name, Description);
            }
        }

        public override string ToString()
        {
            return Name;
        }

        public override bool Equals(object obj)
        {
            if (obj is string)
                return this.Name.Equals((string)obj);
            else if (obj is UI装备)
            {
                UI装备 UI装备 = (UI装备)obj;
                return UI装备.Name.Equals(this.Name);
            }
            else
                return false;
        }
    }
}
